package cmd

import (
	"os"

	"github.com/spf13/cobra"

	"atomgit.com/atomgit_dev/git-hooks/pkg/hooks"
)

// packObjectsCmd represents the packObjects command
var packObjectsCmd = &cobra.Command{
	Use:                "pack-objects",
	Short:              "pack-objects hook",
	DisableFlagParsing: true,
	DisableSuggestions: true,
	SilenceUsage:       true,
	Run: func(cmd *cobra.Command, args []string) {
		os.Exit(hooks.Run("pack-objects", args...))
	},
}

func init() {
	rootCmd.AddCommand(packObjectsCmd)

	// Here you will define your flags and configuration settings.

	// Cobra supports Persistent Flags which will work for this command
	// and all subcommands, e.g.:
	// postReceiveCmd.PersistentFlags().String("foo", "", "A help for foo")

	// Cobra supports local flags which will only run when this command
	// is called directly, e.g.:
	// postReceiveCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
